#include <iostream>
#include <vector>
#include "time.h"

int main(){
/*
	Time t0, t1(1,2,3);
	std::cout << t0.getHour() << t0.getMin() << t0.getSec() << std::endl;
	std::cout << t1.getHour() << t1.getMin() << t1.getSec() << std::endl;
	t0.setHour(2);
	std::cout << t0.getHour() << std::endl;
	t0.setMin(04);
	std::cout << t0.getMin() << std::endl;
	t0.setSec(13);
	std::cout << t0.getSec() << std::endl;
	t0.printAmPm();*/
	
	std::vector<Time> times;
	Time t0(1,9,8);
	Time t1(3,8,1);
	Time t2(7,5,8);
	Time t3(2,4,46);
	Time t4(13,54,12);
	Time t5(13,8,6);
	Time t6(21,35,34);
	Time t7(16,7,8);
	Time t8(12,3,2);
	times.push_back(t0);
	times.push_back(t1);
	times.push_back(t2);
	times.push_back(t3);
	times.push_back(t4);
	times.push_back(t5);
	times.push_back(t6);
	times.push_back(t7);
	times.push_back(t8);
	sort(times.begin(), times.end(), IsEarlierThan);
	for(int i = 0; i < 9; i++)
		times[i].printAmPm();
	
	return 0;
}
